package com.jxb.consumer;

import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

/**
 *     SelectorType,selectorExpression()：用于定制过滤消息
 *
 *     ConsumeMode：用于定制顺序消息
 *
 *     MessageModel：用于定制集群部署还是广播部署
 */

@Component
@RocketMQMessageListener(consumerGroup = "MyConsumerGroup",topic = "TestTopic")
public class SpringConsumer implements RocketMQListener<String> {


    @Override
    public void onMessage(String message) {
        System.out.println("Received message : "+ message);
    }

}
